package com.pda.yuanjing.pages.inbill.scanf;

import com.pda.yuanjing.beanout.ScanfBeanOut;
import com.pda.yuanjing.thread.CodeBeans;
import com.public_module.basemvp.present.BasePresenter;
import java.util.List;

public class InScanfPresent extends BasePresenter<InScanfModel, InScanfView> implements InScanfModel.CallBack {

    public void getDeatail(String  bill) {
        view.showProgress();
        model.getDeatail(bill,this);
    }

    public void addCode(String billID,String billListID,String productID, CodeBeans codeBeans) {
       model.addCode(billID,billListID,productID,codeBeans,this);
    }

    public void deleteCode(String billID,String billListID,String productID, CodeBeans codeBeans) {
        model.deleteCode(billID,billListID,productID,codeBeans,this);
    }

    @Override
    public void oninitView(List<ScanfBeanOut.DataBean> list) {
        if(view!=null)
        {
            view.hideProgress();
            view.initView(list);
        }
    }

    @Override
    public void onupdateView(List<ScanfBeanOut.DataBean> list) {
        if(view!=null)
        {
            view.updateView(list);
        }
    }

    @Override
    public void onshowres(String str) {
        if(view!=null)
        {
            view.hideProgress();
            view.showres(str);
        }
    }
}


